package com.shop.core;


/**
 * 隶属于订单的货物信息
 * @author yuxiaowei
 *
 */
public class GoodsItem {
	private String id;//商品id
	private String goodsAttr="";//商品属性Id

	private String name;//商品名称
	private int num;//货物数量
	private double unitprice;
	private double discount;//优惠金额
	private double charge;//单项总费用
	private double fare;//单项总运费
	private String color;//颜色
    private String size;//尺寸
	private double hgprice;
	private String smallicon="ceshi/none.png";
	
	
	public String getGoodsAttr() {
		return goodsAttr;
	}
	public void setGoodsAttr(String goodsAttr) {
		this.goodsAttr = goodsAttr;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getSize() {
		return size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	
	
	public double getHgprice() {
		return hgprice;
	}
	public void setHgprice(double hgprice) {
		this.hgprice = hgprice;
	}
	public String getSmallicon() {
		return smallicon;
	}
	public void setSmallicon(String smallicon) {
		this.smallicon = smallicon;
	}
	//@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "[id="+id+",name="+name+",num="+num+",unitprice="+unitprice+",discount="+discount+",charge="+charge+",fare="+fare+"]";
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public double getUnitprice() {
		return unitprice;
	}
	public void setUnitprice(double unitprice) {
		this.unitprice = unitprice;
	}
	public double getDiscount() {
		return discount;
	}
	public void setDiscount(double discount) {
		this.discount = discount;
	}
	public double getCharge() {
		charge=num*unitprice-discount+fare;
		return charge;
	}
	public void setCharge(double charge) {
		this.charge = charge;
	}
	public double getFare() {
		return fare;
	}
	public void setFare(double fare) {
		this.fare = fare;
	}
	
	
}
